﻿namespace NoodleShop.Api.Models
{
    public class OrderModel
    {
        public string Id { get; set; }
        public string Status { get; set; }
        public string Type { get; set; }

        public delegate void StatusChangedHandler(string id, string status);

        public event StatusChangedHandler StatusChanged;

        public void ChangeStatus(string newStatus)
        {
            if (Status != newStatus)
            {
                Status = newStatus;
                StatusChanged.Invoke(Id, newStatus);
            }
        }
    }
}
